On Verifying Resource Contracts using Code Contracts
نویسندگان
چکیده
In this paper we present an approach to check resource consumption contracts using an off-theshelf static analyzer. We propose a set of annotations to support resource usage specifications, in particular, dynamic memory consumption constraints. Since dynamic memory may be recycled by a memory manager, the consumption of this resource is not monotone. The specification language can express both memory consumption and lifetime properties in a modular fashion. We develop a proof-of-concept implementation by extending CODE CONTRACTS’ specification language. To verify the correctness of these annotations we rely on the CODE CONTRACTS static verifier and a points-to analysis. We also briefly discuss possible extensions of our approach to deal with non-linear expressions.
منابع مشابه
Executable Operational Semantics of Solidity
Bitcoin has attracted everyone’s attention and interest recently. Ethereum (ETH), a second generation cryptocurrency, extends Bitcoin’s design by offering a Turing-complete programming language called Solidity to develop smart contracts. Smart contracts allow creditable execution of contracts on EVM (Ethereum Virtual Machine) without third parties. Developing correct smart contracts is challeng...
متن کاملModelling and Experimental Testing of Asymmetric Information Problems in Lease and Hire Contracts (Based on Contract Theory)
This article aims to study lease and hiring contract in the Iranian-Islamic setting and analyze the asymmetric information problem in these contracts. For doing this, we study the characteristics of lease and hiring contracts in Iran (real world experimental characteristics that recognized in other studies), using library method, then we mathematically model different aspects of asymmetric info...
متن کاملResource Verification for Higher- order Functions with Memoization
We present a new approach for specifying and verifying resource utilization of higher-order functional programs that use lazy evaluation and memoization. In our approach, users can specify the desired resource bound as templates with numerical holes e.g. as steps ≤ ? ∗ size(l) + ? in the contracts of functions, as well as express invariants necessary for establishing the bounds that may possibl...
متن کاملAnalysis of Energy Service Contracts in the Framework of Foreign Investment
Funding by energy services companies is an efficient, new way of financing energy efficiency projects. An Energy Services Company (ESCO) is a company that designs, implements and finances energy efficiency improvement projects. Some of the services that these companies offer include developing, designing and financing energy efficiency projects, installing and maintaining energy efficiency proj...
متن کاملA Study on Legal-juridical Basis of Remission of Debts and Analysis of Release of Debts in Guaranty Contracts
Remission of debts is a legal action which, to the Shia jurisprudents, is the cancellation of right rather than ownership; however, mostly jurisprudents know it a disposition. Conversely, some considerremission of debt a contract. Article 289 of Civil Code follows the jurists’ famous viewpoint.In guaranty contracts, discarding part of creditors’ claim and/or acceptance of respite to the busines...
متن کامل